package com.book.service.impl;

import com.book.dao.TempOrderDao;
import com.book.pojo.TempOrder;
import com.book.service.TempOrderService;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @version 1.0
 * @Author Jincheng.Li
 * @Date 2021/6/1 10:59 上午
 * @Project_Name graduation-project
 */
@Service
public class TempServiceImpl implements TempOrderService {
    @Autowired
    private TempOrderDao tempOrderDao;
    @Override
    public void save(List<TempOrder> orderList) {
        if (CollectionUtils.isEmpty(orderList)){
            return;
        }
        orderList.forEach(m->{
            tempOrderDao.insertSelective(m);
        });
    }

    @Override
    public List<TempOrder> getTempOrder(String orderNo) {
        return tempOrderDao.getTempOrder(orderNo);
    }

    @Override
    public void delete(String orderNo) {

    }
}
